__author__ = 'Soul'

from core.Logger import *

class DbOperator:
    def __init__(self, conn):
        self.__conn__ = conn

    # close connect
    def close(self):
        self.__conn__.close()

    def __do_insert__(self, sql, params = None):
        return self.__conn__.do_insert(sql, params)

    def __do_insert_many__(self, sql, params = None):
        return self.__conn__.do_insert_many(sql, params)

    def __select_one__(self, sql, params = None):
        return self.__conn__.select_one(sql, params)

    def __select_all__(self, sql, params = None):
        return self.__conn__.select_all(sql, params)

    def __do_update__(self, sql, params = None):
        return self.__conn__.do_update(sql, params)

    def __do_delete__(self, sql, params = None):
        return self.__conn__.do_delete(sql, params)